<?php
/**
* 模块管理
* @DateTime 2017-09-05
* @author xyl
*/
class Introduce extends Admin_Controller
{
	
	function __construct()
	{
		parent::__construct();
		$this->load->model('Introduce_model','introduce');
		
	}
    /**
     * 模块首页
     * @DateTime 2017-09-05
     * @author xyl
     * @return   [type]     [description]
     */
    public function index($type = 1)
    {
        if ($_POST) {
            $post = $this->input->post();
            $res = $this->introduce->addIntroduce($post,$type);
            $this->handleResult($res);
        } else {
            $info = $this->introduce->getIntroduceDetail($type);
            if (!empty($info)) {
                $vdata = $info;
            }
            $vdata['type'] = $type;
            // print_r($vdata);
            $this->load->view('Introduce/index',$vdata);
        }
    }
}